const { defineConfig } = require('@vue/cli-service')
const { VantResolver } = require('unplugin-vue-components/resolvers')
const ComponentsPlugin = require('unplugin-vue-components/webpack')
// const path = require('path')
module.exports = defineConfig({
  transpileDependencies: true,

  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'sass',
      patterns: []
    }
  }
})
// module.exports = {
//   configureWebpack: config => {
//     config.externals = {
//       AMap: 'AMap',
//       AMapUI: 'AMapUI'
//     }
//   }
// }
module.exports = {
  configureWebpack: {
    plugins: [
      ComponentsPlugin({
        resolvers: [VantResolver()]
      })
    ],
    externals: {
      AMap: 'AMap' // 高德地图配置
    }
  }
}
